function setTableTrOver(id1,id2){
	var base=ylBase;
	var arr=base.tagArr(base.$(id1),'tr'),len=arr.length,i=0;
	var arr2=base.tagArr(base.$(id2),'tr');
	var num=0;
	for(;i<len;i++){
		if(i%2){
			arr[i].className=arr2[i].className='even';
		}
		arr[i].setAttribute('cssName',arr[i].className);
		
		arr[i].onmouseover=arr2[i].onmouseover=function(n){
			return function(){
				arr[n].className=arr2[n].className='over';
				showInfoBox(this);
			}
		}(i);
		arr[i].onmouseout=arr2[i].onmouseout=function(n){
			return function(){
				arr[n].className=arr2[n].className=arr[n].getAttribute('cssName');
				closeInfoBox();
			}
		}(i);
	}
}
var showinfoBox=null;
function showInfoBox(obj){
	var base=ylBase;
	if(base.tagArr(obj,'th').length)return;
	var divObj=base.buildElement('div',document.body);
	divObj.className='menuBox';
	var xy=base.offsetLT(obj);
	divObj.style.left=(xy.x+100)+'px';
	divObj.style.top='0px';
	var str=[];
	base.cyc(base.tagArr(obj,'td'),function(o){
		str[str.length]='<a href="javascript:viod(0)">'+o.innerHTML+'</a>';
	},5);
	divObj.innerHTML=str.join('');
	var top=xy.y+obj.offsetHeight;
	top=((top+divObj.offsetHeight)>base.dElement().clientHeight)?(xy.y-divObj.offsetHeight):top;
	divObj.style.top=top+'px';
	showinfoBox=divObj;
}
function closeInfoBox(){
	try {
	
	if(!showinfoBox)return;
	showinfoBox.parentNode.removeChild(showinfoBox)
	}catch(exception){}

}
function copyTable(copyId,pasteId){
	var base=ylBase;
	var copyObj=base.$(copyId);
	base.tagArr(copyObj,'div')[0].style.width=base.tagArr(copyObj,'table')[0].offsetWidth+'px';
	pasteObj=base.$(pasteId).innerHTML=copyObj.innerHTML;
	setTableTrOver(copyId,pasteId);
}
function setTableOver(id,type){
	var base=ylBase;
	var arr=base.tagArr(base.$(id),'tr'),len=arr.length,i=0;
	var num=0;
	for(;i<len;i++){
		if(i%2){
			arr[i].className='even';
		}
		arr[i].setAttribute('cssName',arr[i].className);
		
		arr[i].onmouseover=function(n){
			return function(){
				arr[n].className='over';
				if(!type)showInfoBox(this);
			}
		}(i);
		arr[i].onmouseout=function(n){
			return function(){
				arr[n].className=arr[n].getAttribute('cssName');
				if(!type)closeInfoBox();
			}
		}(i);
	}
}

function initEditBox(id,cssName){
	var base=ylBase;
	base.cyc(base.className(base.$(id),cssName),function(obj){
		obj.onclick=function(){
			if(!base.tagArr(this,'input').length){
				var html=this.innerHTML;
				var width=this.offsetWidth;
				this.innerHTML='';
				var o=base.buildElement('input',this);
				o.value=html;
				o.onblur=function(){
					this.parentNode.innerHTML=this.value;
				}
				o.className='textEdit';
				o.style.width=(width-20)+'px';
				o.focus();
			}
		};
	});
	
}